/* 
 * File:   main.cpp
 * Author: Yinhaochuan
 *
 * Created on 2013年9月27日, 下午11:17
 */

#include <cstdlib>

#include"sort.h"
void testBubbleSort()
{
    cout<<"test bubble sort:"<<endl;
    int arr[19] = {12,123,43,3,55,53,245,89,2,3,1,12,59,48,34,19,10,20,200};
    bubbleSort(arr,19);
    print(arr,19);
}

void testInsertSort()
{
    cout<<"test insert sort:"<<endl;
    int arr[19] = {12,123,43,3,55,53,245,89,2,3,1,12,59,48,34,19,10,20,200};
    insertSort(arr,19);
    print(arr,19);
}

void testQuickSort()
{
    cout<<"test quick sort:"<<endl;
    int arr[19] = {12,123,43,3,55,53,245,89,2,3,1,12,59,48,34,19,10,20,200};
    quickSort(arr,0,18);
    print(arr,19);
}
void testSelectSort()
{
    cout<<"test select sort:"<<endl;
    int arr[19] = {12,123,43,3,55,53,245,89,2,3,1,12,59,48,34,19,10,20,200};
    selectSort(arr,19);
    print(arr,19);
}
void testMergeSort()
{
    cout<<"test merge sort:"<<endl;
    int arr[19] = {12,123,43,3,55,53,245,89,2,3,1,12,59,48,34,19,10,20,200};
    mergeSORT(arr,19);
    print(arr,19);
}
void testShellSort()
{
    cout<<"test shell sort:"<<endl;
    int arr[19] = {12,123,43,3,55,53,245,89,2,3,1,12,59,48,34,19,10,20,200};
    shellSort(arr,19);
    print(arr,19);
}

/*
 * 
 */
int main(int argc, char** argv) {
  /* testBubbleSort();
    testQuickSort();
    testInsertSort();
    testSelectSort();
    testShellSort();*/
    testMergeSort();
    return 0;
}

